/*
 * Graph 根据org.sysmo.server.node.item.graphgroup提供的参数返回图表
 * Copyright (C) 2009  LiuHao
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.sysmo.server.graph;

import java.awt.Image;
import java.util.Vector;

/**
 * 图表类Stub。
 *
 * @author LiuHao
 */
public class Graph {
    private Image tempgraph;
    private Vector tempvec;

    /**
     * 画图函数，由org.sysmo.server.node.item.graphgroup包提供4个参数返回图形。
     * <br />
     *
     * 函数实现方式：变量GraphPoints是一个二维数组，他存储着多个监控项在一定时间内的
     * 点阵列（点以Point形式表示），首先按AxisPara参数所规定的数据画出坐标轴和参照线，
     * 由GraphPoints中的数据确定坐标轴的最大值和最小值和单位分划，确定若干个标志点
     * 然后按照DerivInteg参数的值将GraphPoints中的各个数组转化为对应的积分/导数/原值
     * 点阵存储在原vector中，最后按照GraphMode的要求将这些点阵画在拟定好的坐标轴上
     *
     * @param GraphPoints vector型的坐标集合
     * @param GraphMode 整型的图表显示模式(面图，线图等)参数
     * @param AxisPara 整型的坐标轴分划参数
     * @param DerivInteg vector型的求导或求积分参数列
     *
     * @return tempgraph 返回一个指向已生成的.jpg格式图表
     */

    public Image drawGragh(Vector<Vector<Point>> GraphPoints, int GraphMode, int AxisPara, Vector<Integer> DerivInteg){
        //计算并生成图形的过程
        //生成的图形暂时存在tempgraph中
        return tempgraph;
    };
    /**
     * 求导函数。由DrawGraph函数调用返回特定一组数据的导数
     *
     * @Param DataVec vector型的被求导数组
     *
     * @return tempvec vector型的求导完成后的函数点阵列
     */
    private Vector<Point> derivative(Vector<Point> DataVec){
        return tempvec;
    };
    /**
     * 求积函数。由DrawGraph函数调用返回特定一组数据的积分
     *
     * @Param DataVec vector型的被积分数组
     *
     * @return tempvec vector型的求导完成后的函数点阵列
     */
    private Vector<Point> integral(Vector<Point> DataVec){
        return tempvec;
    };
}
